/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mvp.levelup.swing;

import java.awt.Dimension;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.WindowConstants;

/**
 *
 * @author WORKSPOT2
 */
public class TestFrame extends JFrame
{

    public TestFrame() throws HeadlessException
    {
        setupFrame();
        fillFrame();
    }

    private void setupFrame()
    {
        setTitle("My First Frame");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Toolkit t = Toolkit.getDefaultToolkit();
        Dimension d = t.getScreenSize();
        int coordX = d.width / 2;
        int coordY = d.height / 2;
        int windowWidth = 300;
        int windowHeight = 300;
        coordX = coordX - windowWidth / 2;
        coordY = coordY - windowHeight / 2;
        setBounds(coordX, coordY, windowWidth, windowHeight);
    }

    private void fillFrame()
    {
        ButtonPanel bp = new ButtonPanel();
        add(bp);
    }
}
